package com.yn.pet.bus.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 地理围栏信息表(GenFence)表实体类
 *
 * @author makejava
 * @since 2025-07-09 12:00:47
 */
@Data
@TableName("t_gen_fence")
@EqualsAndHashCode(callSuper = true)
public class GenFence extends Model<GenFence> {
    //主键ID
    @TableId(type = IdType.AUTO)
    private Long fenceId;
    //用户ID
    private Long userId;
    //设备ID
    private Long deviceId;
    //围栏名称
    private String fenceName;
    //围栏类型 1-圆形 2-多边形
    private Integer fenceType;
    //中心纬度(圆形)
    private Double centerLat;
    //中心经度(圆形)
    private Double centerLng;
    //半径米(圆形)
    private Integer radius;
    //多边形顶点坐标(json)
    private String vertices;

    //围栏详细地址
    private String fenceAddress;

    //启用时间
    private Date enableTime;
    //禁用时间
    private Date disableTime;
    //状态 0-禁用 1-启用
    private Integer useStatus;

    //消息状态
    private Integer messageStatus;
    //创建时间
    private Date createTime;
    //更新时间
    private Date updateTime;

    //是否删除
    private Integer isDelete;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.fenceId;
    }
}

